package com.svse.designPattern.structure.decorator.concretedecorator;

import com.svse.designPattern.structure.decorator.component.MilkTea;
import com.svse.designPattern.structure.decorator.decorator.Taste;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/8/2 8:47
 */
public class MilkTaste2 extends Taste {

    private String desc = "奶茶再加一份椰果";

    private MilkTea milkTea=null;

    public MilkTaste2(MilkTea milkTea) {
        this.milkTea = milkTea;
    }

    @Override
    public String milkTeaName(){

        return  milkTea.milkTeaName() +"____"+desc;
    }

    @Override
    public int milkTeaPrice(){
        return  milkTea.milkTeaPrice() + 4;
    }
}
